package demo

import org.apache.spark.{SparkConf, SparkContext}

object Demo2 {

  def main(args: Array[String]): Unit = {

    val conf = new SparkConf().setAppName("aaa").setMaster("local")
    val sc = new SparkContext(conf)

    val value = sc.textFile("src\\main\\scala\\data\\join2.txt")
    val value1 = value.map(
      x => (x, 1)
    )

    value1.collect().foreach(println)

    sc.stop()
  }

}
